package main

import (
	"log"
	"time"
)

func main() {
	array := []int{1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096}
	for _, v := range array {
		printLog(v)
	}

}

func printLog(step int) {
	arr := [512 * 1024 * 1024]int64{}
	count := len(arr)

	start := time.Now()
	for i := 0; i < count; i += step {
		arr[i] *= 3
	}
	elapsed := int64(time.Since(start) / time.Millisecond)

	log.Printf("\t%d\t%d", step, elapsed)
}
